package objects;

import java.io.Serializable;

public class Exp implements Serializable{
	
	public int number;
	public int exponent;
	
	public Exp(int n, int e){
		number = n;
		exponent = e;
	}
	
	public double value(){
		double value = 1;
		if(exponent > 0){
			for(int i=1; i<=exponent; i++){
				value = value*number;
			}
		}else if(exponent < 0){
			int e = -1*exponent;
			for(int i=1; i<=e; i++){
				value = value/number;
			}
		}else{
			return 1;
		}
		return value;
		//return number^exponent;
	}
	
}
